//
//  ChongzhiViewController.m
//  YSZC
//
//  Created by 张斌 on 16/4/18.
//  Copyright © 2016年 YueShiKeJi. All rights reserved.
//

#import "ChongzhiViewController.h"
#import "YSDoViewManager.h"
#import "ICEBTPayPassWordView.h"
#import "ZSDPaymentView.h"
@interface ChongzhiViewController ()

@property (weak, nonatomic) IBOutlet UIButton *nextteptbtn;
@end

@implementation ChongzhiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}

- (void)viewDidLayoutSubviews{
    [super viewDidLayoutSubviews];
    
    [[YSDoViewManager sharedmanager] settoyuanWithview:@[self.nextteptbtn]];
}

- (IBAction)nextstepbtnclick:(id)sender {
//    [ICEBTPayPassWordView showPassWordViewInView:^(NSString *password) {
//        
//        /**
//         这里是模拟网络请求，把输入密码和后台的密码进行比较。我是根据
//         广播通知来获取最终的验证的结果，如果我们输入密码和后台密码一样，则移除当前密码输入框。否则抖动密码
//         输入框提示密码错误。ps:骚年请记得发一个通知偶。
//         ***/
//        
//        // 123456换成后台存储的密码
//        BOOL result = [password isEqualToString:@"123456"]?YES:NO;
//        NSDictionary *dic = @{
//                              @"validateResult":@(result)
//                              };
//        
//        [[NSNotificationCenter defaultCenter] postNotificationName:KNotification_ValidatePassWord object:nil userInfo:dic];
//        
//        
//        NSLog(@"password = %@",password);
//    }];
    
    ZSDPaymentView *payment = [[ZSDPaymentView alloc]init];
    payment.title = @"请输入支付密码";
    payment.goodsName = @"中国建设银行尾号4384";
    payment.amount = 1314.00f;
__weak typeof (payment) weakpayment = payment;
    payment.finishdblock = ^{


        [weakpayment dismiss];
    };
    [payment show];


}


@end
